import { defineRouteConfig, lazy } from 'src/utils';
import { FeatureErrorBoundary } from 'src/feature-antd';

const modules = import.meta.glob('./modules/*/index.tsx', { eager: true });

export const Index = defineRouteConfig(
  {
    path: 'dashboard',
    lazy: lazy(() => import('./element')),
    errorElement: <FeatureErrorBoundary />,
  },
  modules,
);

export default Index;
